PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Constant

A value of class Constant is a reserved word defined by AppleScript or an application in its dictionary. Applications define sets of values that can be used for parameters of a particular command. For example, the value of the saving parameter of a Close command must be one of the three constants yes , no , and ask , where saving no means do not save any changes, saving yes means save without asking, and saving ask means ask the user whether to save.

For more information on the use of constants in AppleScript, see Constants.

LITERAL EXPRESSIONS
yes
no
ask
plain
bold
italic

For a complete listing of the constants AppleScript provides, see Table A-3 and Table A-2.

PROPERTY
Class
The class identifier for the object. This property is read-only, and its value is always constant .
ELEMENTS

None

OPERATORS

The operators that take values of class Constant as operands are & , = , , and As.

COERCIONS HANDLED

AppleScript supports coercion of a constant to a single-item list.

Starting in version 1.3.7, AppleScript supports coercion of a constant to a string.

NOTES

Constants are not strings, and they must not be surrounded by quotation marks.

You cannot define your own constants; constants can be defined only by applications and AppleScript.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)